package com.ruoyi.service.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.service.mapper.ServiceCancelorderreasonMapper;
import com.ruoyi.service.domain.ServiceCancelorderreason;
import com.ruoyi.service.service.IServiceCancelorderreasonService;

/**
 * 订单取消原因Service业务层处理
 * 
 * @author ZDL
 * @date 2024-12-25
 */
@Service
public class ServiceCancelorderreasonServiceImpl implements IServiceCancelorderreasonService 
{
    @Autowired
    private ServiceCancelorderreasonMapper serviceCancelorderreasonMapper;

    /**
     * 查询订单取消原因
     * 
     * @param cancelorderreasonId 订单取消原因主键
     * @return 订单取消原因
     */
    @Override
    public ServiceCancelorderreason selectServiceCancelorderreasonByCancelorderreasonId(Long cancelorderreasonId)
    {
        return serviceCancelorderreasonMapper.selectServiceCancelorderreasonByCancelorderreasonId(cancelorderreasonId);
    }

    /**
     * 查询订单取消原因列表
     * 
     * @param serviceCancelorderreason 订单取消原因
     * @return 订单取消原因
     */
    @Override
    public List<ServiceCancelorderreason> selectServiceCancelorderreasonList(ServiceCancelorderreason serviceCancelorderreason)
    {
        return serviceCancelorderreasonMapper.selectServiceCancelorderreasonList(serviceCancelorderreason);
    }

    /**
     * 新增订单取消原因
     * 
     * @param serviceCancelorderreason 订单取消原因
     * @return 结果
     */
    @Override
    public int insertServiceCancelorderreason(ServiceCancelorderreason serviceCancelorderreason)
    {
        return serviceCancelorderreasonMapper.insertServiceCancelorderreason(serviceCancelorderreason);
    }

    /**
     * 修改订单取消原因
     * 
     * @param serviceCancelorderreason 订单取消原因
     * @return 结果
     */
    @Override
    public int updateServiceCancelorderreason(ServiceCancelorderreason serviceCancelorderreason)
    {
        return serviceCancelorderreasonMapper.updateServiceCancelorderreason(serviceCancelorderreason);
    }

    /**
     * 批量删除订单取消原因
     * 
     * @param cancelorderreasonIds 需要删除的订单取消原因主键
     * @return 结果
     */
    @Override
    public int deleteServiceCancelorderreasonByCancelorderreasonIds(Long[] cancelorderreasonIds)
    {
        return serviceCancelorderreasonMapper.deleteServiceCancelorderreasonByCancelorderreasonIds(cancelorderreasonIds);
    }

    /**
     * 删除订单取消原因信息
     * 
     * @param cancelorderreasonId 订单取消原因主键
     * @return 结果
     */
    @Override
    public int deleteServiceCancelorderreasonByCancelorderreasonId(Long cancelorderreasonId)
    {
        return serviceCancelorderreasonMapper.deleteServiceCancelorderreasonByCancelorderreasonId(cancelorderreasonId);
    }
}
